package com.qn.visitor.write.mysql;

import com.qn.visitor.entity.UserLanguageRecord;
import com.qn.visitor.mapper.UserLanguageRecordMapper;
import com.qn.visitor.write.UserLanguageWrite;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * qingniu-cloud user source analysis
 *
 * @Author: TXG
 * @Date: 2024/6/11
 * @Version V0.0.2
 */
@Service("MySqlUserLanguageWrite")
public class UserLanguageWriteImpl
        implements UserLanguageWrite {
    private static Logger log= LoggerFactory.getLogger(UserLanguageWriteImpl.class);
    @Autowired
    UserLanguageRecordMapper baseMapper;
    @Override
    public void add(UserLanguageRecord record) {
        try {
            baseMapper.insert(record);
        } catch (Exception e) {
            log.warn("数据写入异常",record);
        }
    }
    @Override
    public String getHash(String hash) {
        return baseMapper.getHash(hash);
    }
}
